package org.acme.server.controller;

import org.acme.server.po.SysServerMessage;
import org.acme.server.service.SysServerMessageService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/*
 * @className: SysServerMessageController
 * @author: chentao
 * @date: 2025/3/7 下午2:33
 * @Version: 1.0
 * @description:
 */
@RestController
public class SysServerMessageController {

    @Resource
    private SysServerMessageService sysServerMessageService;

    /*** 新增数据 ***/
    @RequestMapping(value = "add")
    public String add() {
        SysServerMessage sysServerMessage = new SysServerMessage();
        sysServerMessage.setFromId("xxxx");
        sysServerMessage.setToId("yyy");
        sysServerMessageService.save(sysServerMessage);
        return sysServerMessage.getId();
    }
}
